function checkLogin() {
    let login = sessionStorage.getItem("login");
    if (login =='1') {  
    }else if(login =='2'){
    }else if(login =='3'){
    }else{
        alert("请先登录");
        location.href = "http://localhost/Dorm%20Management/html/login.html";
    }
}
checkLogin();